<!DOCTYPE html>
<html lang="zh">
	<head>
		<meta charset="UTF-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<meta http-equiv="X-UA-Compatible" content="ie=edge" />
		<style type="text/css">
			.sub-title{
				box-shadow: 3px 6px 5px dodgerblue;
				width: 400px;
				height: 60px;
				line-height: 60px;
				background: lightblue;
				text-align: center;
			}
			.panel-demo a{
				color: dodgerblue;
				text-decoration: none;
			}
			.panel-demo a:hover{
				color: dodgerblue;
				text-decoration: underline;
			}
		</style>
		<title>javascript 精粹</title>

		<script src="icedog.js.extend.js" type="text/javascript" charset="utf-8"></script>
		<script src="index.js" type="text/javascript" charset="utf-8"></script>
	</head>

	<body>
		<h1>javascript 精粹</h1>
		<h2 id="sub-title" class="sub-title">测试javascript精粹上的例子</h2>
		<div class="body">
			<ul class="panel-demo">
				<li><a href="hanoi/index.html" target="_blank">hanoi 汉诺塔的例子</a></li>
				<li><a href="fade/index.html" target="_blank">fade 背景色渐变的例子</a></li>
				<li><a href="json/index.html" target="_blank">json 相关的例子</a></li>
			</ul>
		</div>
		<script type="text/javascript">
			var h2 = document.querySelector("#sub-title");
			var high = "ffffff";
			high = parseInt(high,16);
			setInterval(() => {
				let color = "#"+(Math.floor(Math.random()*high)).toString(16);
				let len = 6-color.length;
				if(len>0){
					var i=len;
					while (i>0){
						color+="0";
						i-=1;
					}
				}
				h2.style.color=color;
			}, 1000);
		</script>
	</body>

</html>